#ifndef COLORBLOCK
#define COLORBLOCK
#include<QPushButton>
#include<QColor>
#include<QLabel>
class ColorBlock : public QPushButton
{
    Q_OBJECT
public:
    explicit ColorBlock(QPushButton *parent = 0,int id=0,int size=20);
    QColor color=Qt::white;
signals:
    void sendColor(const QColor &color);
    void sendId(int id);
    void sendColorAndId(const QColor&color,int id);
public slots:
     void setColor(const QColor &color);
     void setFocused(bool isFocus);

private:
    int id=0;

private slots:
    void setId();
};

#endif // COLORBLOCK

